public class Butt
{
	int x;
	int y;
	int width;
	int height;
	String image;
	String actImage;
	boolean active;
	
	Pic pic;
	
	public Butt(int _x, int _y, int w, int h, String img)
	{
		x = _x;
		y = _y;
		width = w;
		height = h;
		image = "Menu\\" + img;
		actImage = "Menu\\act-" + img;
		pic = new Pic(image, x, y);
	}
	
	public Pic getPic()
	{
		if(active)
			pic.name = actImage;
		else
			pic.name = image;
			
		return pic;
	}
	
	public void mouseMove(int mX, int mY)
	{
		if(isIn(mX, mY) == true)
		{
			active = true;
			//System.out.println("set active");
		}
		else
		{
				active = false;
			//System.out.println("unactive");
		}
	}
	
	public boolean isIn(int mX, int mY)
	{
		if(mX >= x && mX <= (x + width))
		{
			if(mY >= y && mY <= (y + height))
			{
				//System.out.println("its in!");
				return true;
			}
		}
		return false;
	}
}